﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using DragDraw.UserService;
using DragDraw.Util;

namespace DragDraw
{
	public partial class SysMessageControl : UserControl
	{
        private List<SysMessage> m_messages = new List<SysMessage>();

		public SysMessageControl()
		{
			// Required to initialize variables
			InitializeComponent();
		}

        public void Init()
        {
            m_messages.Clear();
            foreach (SysMessage msg in OperationManager.Instance.MyMessages)
            {
                m_messages.Add(msg);
            }
            listMessage.ItemsSource = m_messages;
        }
	}
}